package com.aaa.dao;

import com.aaa.entity.User;

import java.util.List;

public interface UserDao {
    public User checkUsernameAndPassword(User user);

    public List<User> listPage(String keyword, Integer offset, Integer limit);

    public Integer count();

    public Integer save(User user);

    public Integer update(User user);

    public Integer checkUsername(String username);

    public Integer checkUsername(String username, Integer id);

    public Integer delete(Integer id);

    //给用户添加角色
    public Integer saveRole(Integer uid, Integer rid);

    public Integer deleteRole(Integer uid);

    /**
     * 修改密码
     * @param user
     * @return
     */
    public Integer updatePassword(User user);


}
